<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="author" content="">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<!--[if lt IE 9]>
	<script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	<script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
	<![endif]-->
	<title>html5</title>
	<!--<script type="text/javascript" src="js/jquery-1.11.0.js" ></script>-->
</head>

<body>
	<video width="500" height="" controls preload autoplay>
		<source src="img/myvideo.mp4" type="video/mp4"></source>
		
		<object width="" height="" type="application/x-shockwave-flash" data="myvideo.swf">
			<param name="movie" value="myvideo.swf" />
			<param name="flashvars" value="autostart=true&amp;file=myvideo.swf" />
		</object>
		当前浏览器不支持 video直接播放，点击这里下载视频： <a href="myvideo.webm">下载视频</a>
	</video>
	
	<!--<video src="img/myvideo.mp4" poster="img/piv.gif" controls="controls"></video>-->
	<script>
	window.onload=function(){
		var video=document.getElementsByTagName("video")[0];
		var src=video.src;
		var currentSrc=video.currentSrc;
		var duration=video.duration;
		console.log(src);
		console.log(currentSrc);
		console.log(duration);
	}
	
	</script>
</body>
<!--<script>
	// 创建 video 元素
	var vidTest = document.createElement("video");
	// 检测是否可以播放 ogg 格式的视频
	oggTest = vidTest.canPlayType('video/ogg; codecs="theora, vorbis"');
	// 检测是否可以播放 MP4 格式的视频
	h264Test = vidTest.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
	console.log(oggTest);
	console.log(h264Test);
</script>-->
</html>
